import { defineStore } from "pinia";
import { reqAttrList } from '@/api/product/attr/attr'
import useCategoryStore from "./category";
let categoryStore = useCategoryStore()
const useAttrStore = defineStore('attr', {
    state: () => {
        return {
            attrList: []
        }
    },
    actions: {
        async getAttrList() {
            let { C1Id, C2Id, C3Id } = categoryStore
            let result = await reqAttrList(C1Id, C2Id, C3Id)
            console.log(result);
            this.attrList = result
        }

    }
})

export default useAttrStore